package server.customers;

import java.util.Arrays;
import java.util.List;

import org.apache.log4j.Logger;

import server.database.AbstractTable;
import server.database.DatabaseColumn;
import server.database.IDatabaseTable;
import server.users.UsersTable;

public class CustomersTable extends AbstractTable
{
	private static final Logger log = Logger.getLogger(UsersTable.class);

	public static final String TABLE_NAME = "Customers";

	public static final DatabaseColumn ID = new DatabaseColumn(IDatabaseTable.ID, INTEGER, Arrays.asList(AUTO_INCREMENT));
	public static final DatabaseColumn NAME = new DatabaseColumn("name", STRING, Arrays.asList(NOT_NULL));
	public static final DatabaseColumn ADDRESS = new DatabaseColumn("address", STRING, Arrays.asList(NOT_NULL));
	public static final DatabaseColumn CONTACT_PERSON = new DatabaseColumn("contact_person", STRING, Arrays.asList(NOT_NULL));
	public static final DatabaseColumn PHONE_NUMBER = new DatabaseColumn("phone_number", STRING, Arrays.asList(NOT_NULL));

	public final List<DatabaseColumn> m_lstColumns = Arrays.asList(ID, NAME, ADDRESS, CONTACT_PERSON, PHONE_NUMBER);
	public final List<DatabaseColumn> m_lstKey = Arrays.asList(ID);

	@Override
	public String getTableName()
	{
		return TABLE_NAME;
	}

	@Override
	public List<DatabaseColumn> getColumns()
	{
		return m_lstColumns;
	}

	@Override
	public List<DatabaseColumn> getPrimaryKey()
	{
		return m_lstKey;
	}

	@Override
	public List<DatabaseColumn> getUniqueKey()
	{
		return null;
	}

}
